Adhoc Embed Link
• This document is all about how to use adhoc embed link to achieve various functionalities. In this document you will learn about different ways of using Adhoc embed link.
Objective
- To create Adhoc Embed Link
(I.) Run report with embed link: This is a very basic ways to use adhoc reports in your application. Here you can embed output of your adhoc reports in your application via embed link in various output formats.
To do so, login to OPNBI application with your credentials.
Go to adhoc grid view. There are two ways in which user can embed the report.
I. Select report & Clicking on Embed located at the bottom-most toolbar.
II. By right-clicking the any existing report user can also Embed Adhoc Report.
Select report of which you wish to embed output.
Right click on any report.
You will see Embed option in context menu, just click on that.
By doing this, you will see the embed dialog box appears on the screen.
Click on the embed button.
Uncheck the bypass checkbox.
Click on generate button to generate an external embed link.
Copy external embed link, provide password at &a_p , for ex. ```&a_ppassword``` in embed link and paste it in a separate browser.
Apply report format you want, change
&a_ex__
to&a_ex__HTML
or PDF or XLSX. Even if you do not apply anything, by default it will open in HTML.By doing so you will see report outcome in browser window
Now change user from
a_u__Admin
toa_u__Demo
(any available user with which report is not shared) and password in&a_p__
Run URL in browser and report should not be displayed as is not shared to that user.
Now go to Admin user and share this report with demo user.
change user from
a_u__Admin
toa_u__Demo
in embed linkNow run same URL in browser.
The report should run this time as we have shared report with demo user
(II.) Open Adhoc report in edit mode using embed link: In this case we will see how to redirect to Adhoc edit mode with minor modification in embed URL.
Right click on any report and create external Embed URL
To know how to create external embed link, refer steps from 1 to 9 of this document.
Change
a_tpr__RUN
toa_tpr__PREVIEW
in embed link [make sure you type this in capital Latters]Run this URL in to browser.
You can see, adhoc edit mode is opened. Owner of this report can make changes of dataset or edit dataset.
This report is shared to another user Demo, change
a_u__Admin
toa_u__Demo
and run URL. It will also open adhoc edit mode but as Demo is not owner of this report, dataset edit options are not available.Moreover, the Demo user can make changes in a report by altering available columns and save the changes. When Demo user make changes in report and try to save it, changes will not be reflected in admin user report but instead a new copy of adhoc report will be saved in Demo user login.
If changes are made by admin user, then it will be saved in admin user report.
(III.) Adhoc Template Sharing with Embed Link: [Discussed with Parth Bhai, there should not be embed option for adhoc templates]
in this use case, the user can share adhoc templates with the Embed link.
Log in to OPNBI and go to adhoc Grid Section.
Search for a report with template extension. Right click on that template and click on embed option.
Bind parameter window will open. Click on embed button
By doing so embed Link window will open
Click on generate button to create embed link
Copy external embed link and paste it in separate browser
Apply report format you want, change
&a_ex__
to&a_ex__HTML
or PDF or XLSX. Even if you do not apply anything, by default it will open in HTML.provide password at
&a_p__
, for ex.&a_p__password
in embed link for relevant userBy doing so you will see report outcome in browser window
Now change user from
a_u__Admin
toa_u__Demo
(any available user with which report is not shared) and password for that user at&a_p__
Run URL in browser and report should not displayed as is not shared to that user.
Now go to Admin user and share report with demo user
Generate embed link again and change user from
a_u__Admin
toa_u__Demo
Now run same URL in browser
The report should run this time as we have shared report with demo user
Change
a_tpr__RUN
toa_tpr__PREVIEW
in embed link [make sure you type this in capital latters]Run this URL in to browser
You can see, adhoc edit mode is opened. Owner of this report can make changes of dataset or edit dataset.
Share this report is shared to another user Demo, change
a_u__Admin
toa_u__Demo
and run URL. It will also open adhoc edit mode but as Demo is not owner of this report, dataset edit options are not available.Moreover, Demo user can make changes in report by altering available columns and save the changes
When Demo user make changes in report and try to save it, changes will not be reflected in admin user report but instead a new copy of adhoc report will be saved in Demo user login.
If changes are made by admin user, then it will be saved in admin user report
(IV.) Open blank adhoc report/ Specific adhoc template from General Embed link: This includes how to open specific report or template with generalized embed link.
To create general, embed link, go to adhoc report grid view and you can see create embed link option in footer menu
Without selecting any report or template just click on that button
Deselect bypass checkbox and Click on generate button to generate external embed link. You will see success message.
Scroll down and Copy external embed link, enter password for that user at
&a_p__
and run in to browser windowYou will see blank adhoc report window will open where you can create adhoc report by selecting dataset.
Note
- List of Datasets displayed here is solely depend upon user name we are sending in embed link. For example if
a_u__Admin
in embed link then dataset displayed is of admin user only. Supported datset in adhoc report are .ds , .cds and .stash .
User can access the reports created in his repository by selecting report form dropdown
In the selected report, admin can make changes in dataset and change analysis as Admin is the owner here. Also admin can make changes in to this analysis and save it.
this saved analysis will be reflected in Admin users adhoc report grid.
Now change user in embed link at
a_u__Admin
form admin to Demo and password at&a_p__
Run this updated embed link in browser and you will see create adhoc report view of demo user. If you click on list of reports, you will see list of adhoc reports of Demo user only.
You can make changes in selected report and when saved, changes will be reflected in Demo user’s adhoc report.
Open specific Adhoc template using embed link:
Note
- User needs to have an existing template in their login. To do so make a Template by saving any existing report as Template.
To open specific adhoc template using embed link, generate general embed link as we did in step number 1 to 9 and you have to send name of adhoc template with global parameter.
to open Adhoc template put
OPNBIg_xtemplatexnamex___template name
in place of noparam and run URL. For example;
https://localhost:8080/OPNBI/embed/external/694f55746949624b304b50617930684251674d756c45552532425735424342556a324a59477752704c35725159253344/a_u__Admin&a_p__password&a_t__&a_d__Default&a_ex__&a_af__false&a_tpr__PREVIEW/OPNBIg_xtemplatexnamex___AIS Template
Here AIS Template is the name of existing adhoc template.
Copy and run updated URL in browser and you will see template opened in edit mode directly.
Open blank adhoc analysis/ Specific adhoc analysis from General Embed link: what we so for adhoc reports can be done for adhoc analysis also.
Go to adhoc analysis section and create a general embed link from the footer menu without selecting any analysis.
Create external embed link without bypass as we do in step number 4
Provide user name at
a_u__Admin
and password for this user at&a_p__
Run this URL in browser and you will see blank analysis window prompt you to select dataset,
Note
- Supported dataset in analysis are .ds , .cds, .stash and .dml
Select a dataset form the dropdown
Drag and drop columns to created required analysis
Click on preview button to see changes in analysis table
Click on cancel button to close this field list window and you will see analysis has been created
You can see in default analysis name “OPNBI Sample Report” in top left corner dropdown. In order to save it, there is save as icon available after number formatting option.
When you click on save as icon, it will ask you to give analysis name.
Note
- If you provide name which is already available and save it, old analysis will be replaced by new analysis you have saved
- Select the folder and click on save as button to save analysis.
Note
- Analysis will be saved in user storage whose name is passed in embed URL. Here it is Admin user. if you change user name in embed link to Demo then analysis will be saved in Demo user’s repository.
Once saved, you can see list of analysis created in that user’s repository from dropdown list available at the top left corner. Moreover, you will now see save icon just left of the save as icon.
So now you can change and save analysis with the same name provided.
Also, user can shuffle between list of analysis available for that user and play around
To open specific analysis change write
OPNBIg_xrptxnamex___analysis name here
in embed link instead of noparam. For example;You can see created analysis will open whose name is provided in URL
Note
- In case you are trying to open template file with general link by Demo user it won't work as in this case user needs to share dataset used in template file along with template.
- When Demo user makes changes & click on Save burron, COpy of Template will be saved in Demo user Repository.
info
- Click here to know more about Repository.
- But Demo user do not have dataset inside it. ADmin user needs to share dataset to demo user for that. Otherwise, When we open this saved report, there will be no dataset selected.